package com.example.demo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Copyright (C), 2015-2019
 * FileName: TestController
 * Author:   MRC
 * Date:     2019/12/29 11:52
 * Description: 测试服务
 * History:
 */
@RefreshScope
@RestController
public class TestController {


    @Value("${test}")
    private String value;

    /**
     * @Author MRC
     * @Description 访问配置中心的配置项
     * @Date 11:53 2019/12/29
     * @Param []
     * @return java.lang.String
     **/
    @GetMapping("test")
    public String test() {
        return this.value;
    }


}